package com.design.strategy;

/**
 * @ClassName Client.java
 * @Description
 * @author Jon
 * @date 2018年6月19日 下午1:55:22
 */
public class Client {
	public static void main(String[] args) {
		Context contextAdd = new Context(new Add());
		Context contextSub = new Context(new Sub());
		System.out.println("5+3=" + contextAdd.exec(5, 3));
		System.out.println("5-3=" + contextSub.exec(5, 3));
		System.out.println("======枚举策略方式=======");
		System.out.println("5+3=" + CalculatorStrong.ADD.exec(5, 3));
		System.out.println("5-3=" + CalculatorStrong.SUB.exec(5, 3));
	}
}
